{% extends 'admin/common/base.html' %}
{% block css %}
{{super()}}
<link href="{{url_for('admin.static',filename='ajax/libs/jasny/jasny-bootstrap.min.css')}}?v=3.1.3" rel="stylesheet"/>
<link href="{{url_for('admin.static',filename='ajax/libs/datapicker/bootstrap-datetimepicker.min.css')}}" rel="stylesheet"/>
{% endblock %}
{% block body %}
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form">
            <input type="hidden" name="id" value="{{d.id}}">
            <div class="form-group">
				<label class="col-sm-3 control-label is-required">支付类型：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="pay_type" id="pay_type" value="{{d.pay_type}}" required>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-3 control-label is-required">动作类型：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="action_type" id="action_type" value="{{d.action_type}}" required>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-3 control-label is-required">订单号：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="order_no" id="order_no" value="{{d.order_no}}" required>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-3 control-label is-required">商品描述：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="subject" id="subject" value="{{d.subject}}" required>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-3 control-label is-required">交易订单号：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="trade_no" id="trade_no" value="{{d.trade_no}}" required>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-3 control-label is-required">支付金额：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="total_fee" id="total_fee" value="{{d.total_fee}}" required>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-3 control-label is-required">支付状态：</label>
				<div class="col-sm-8">
                    <select id="state" name="state" class="form-control m-b">
						{% for dd in get_dict_data('paylog_state')%}
						<option value="{{dd.value}}" {{'selected' if d.state == dd.value else '' }}>{{dd.label}}</option>
						{% endfor %}
					</select>
				</div>
			</div>
		</form>
	</div>
</body>
{% endblock %}
{% block js %}
{{ super() }}
<script src="{{url_for('admin.static',filename='ajax/libs/jasny/jasny-bootstrap.min.js')}}?v=3.1.3"></script>
<script src="{{url_for('admin.static',filename='ajax/libs/datapicker/bootstrap-datetimepicker.min.js')}}"></script>
<script type="text/javascript">

    $(".dtp").datetimepicker({
        format: 'yyyy-mm-dd',
        minView: "month",
        todayBtn:  true,
        autoclose: true,
    })
    
    $("#form").validate({

    });
    
    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save("{{url_for('admin.cms.paylog.edit')}}", $('#form').serialize());
        }
    }

</script>
{% endblock %}
